home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / Xpm / pixmap / Pixmap.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  26KB  |  1,104 lines

  1. /* * Last edited: Sep 26 10:40 1991 (mallet) */
  2. /*
  3.  * $Id: Pixmap.h,v 1.9 1992/10/27 08:38:07 mallet Exp $
  4.  * 
  5.  * Copyright 1991 Lionel Mallet
  6.  * 
  7.  * Permission to use, copy, modify, distribute, and sell this software and its
  8.  * documentation for any purpose is hereby granted without fee, provided that
  9.  * the above copyright notice appears in all copies and that both that
  10.  * copyright notice and this permission notice appear in supporting
  11.  * documentation, and that the name of Lionel MALLET not be used in
  12.  * advertising or publicity pertaining to distribution of the software
  13.  * without specific, written prior permission.  Lionel MALLET makes no
  14.  * representations about the suitability of this software for any
  15.  * purpose.  It is provided "as is" without express or implied warranty.
  16.  *
  17.  * Lionel MALLET DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
  18.  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  19.  * FITNESS, IN NO EVENT SHALL Lionel MALLET BE LIABLE FOR ANY SPECIAL,
  20.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  21.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 
  22.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  23.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  *
  25.  *  This software is opened and free. Furthermore, everybody is kindly
  26.  * invited to participate to improve it for the benefit of all.
  27.  * Improvements can be new features, bugs fixes and porting issues
  28.  * resolution.
  29.  *
  30.  * Author:  Lionel Mallet, SIMULOG
  31.  */
  32.  
  33. /*
  34.  * $XConsortium: Pixmap.h,v 1.4 90/04/25 08:30:49 dmatic Exp $
  35.  *
  36.  * Copyright 1989 Massachusetts Institute of Technology
  37.  *
  38.  * Permission to use, copy, modify, distribute, and sell this software and its
  39.  * documentation for any purpose is hereby granted without fee, provided that
  40.  * the above copyright notice appear in all copies and that both that
  41.  * copyright notice and this permission notice appear in supporting
  42.  * documentation, and that the name of M.I.T. not be used in advertising or
  43.  * publicity pertaining to distribution of the software without specific,
  44.  * written prior permission.  M.I.T. makes no representations about the
  45.  * suitability of this software for any purpose.  It is provided "as is"
  46.  * without express or implied warranty.
  47.  *
  48.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  49.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  50.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  51.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  52.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  53.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  54.  *
  55.  * Author:  Davor Matic, MIT X Consortium
  56.  */
  57.  
  58.  
  59. #ifndef _Pixmap_h
  60. #define _Pixmap_h
  61.  
  62. /****************************************************************
  63.  *
  64.  * Pixmap widget
  65.  *
  66.  ****************************************************************/
  67.  
  68. #include <X11/Core.h>
  69. #include <X11/Xmu/Converters.h>
  70. #include <X11/Xos.h>
  71. #include <X11/Xfuncproto.h>
  72. #include "xpm.h"
  73.  
  74. /* Resources:
  75.  
  76.  Name             Class        RepType        Default Value
  77.  ----             -----        -------        ------------- 
  78.  cursor              Cursor             Cursor          XC_tcross
  79.  foreground          Foreground         Pixel           XtDefaultForeground
  80.  highlight           Highlight          Pixel           XtDefaultForeground
  81.  framing             Framing            Pixel           XtDefaultForeground
  82.  transparent         Transparent        Pixel           XtDefaultTransparent
  83.  proportional        Proportional       Boolean         True
  84.  grid                Grid               Boolean         True
  85.  gridTolerance       GridTolerance      Dimension       5
  86.  stippled            Stippled           Boolean         True
  87.  axes                Axes               Boolean         True
  88.  resize              Resize             Boolean         True
  89.  distance            Distance           Dimension       10
  90.  squareSize          SquareSize         Dimension       20
  91.  pixmapWidth         PixmapWidth        Dimension       16
  92.  pixmapHeight        PixmapHeight       Dimension       16
  93.  button1Action       Button1Action      Action          Set  
  94.  button2Action       Button2Action      Action          Set
  95.  button3Action       Button3Action      Action          Clear
  96.  button4Action       Button4Action      Action          Clear
  97.  button5Action       Button5Action      Action          Clear
  98.  filename            Filename           String          "scratch"
  99.  addColorNtfyProc   AddColorNtfyProc  AddColorNotifyProc  NULL
  100.  extensionNtfyProc  ExtensionNtfyProc ExtensionNotifyProc NULL
  101.  stipple             Stipple            Bitmap          XtUnspecifiedPixmap
  102.  
  103. Inherited from core:
  104.  background         Background        Pixel        XtDefaultBackground
  105.  border             BorderColor    Pixel        XtDefaultForeground
  106.  borderWidth         BorderWidth    Dimension    1
  107.  mappedWhenManaged   MappedWhenManaged    Boolean        True
  108.  sensitive         Sensitive        Boolean        True
  109.  width             Width        Dimension    0
  110.  height             Height        Dimension    0
  111.  x             Position        Position    320
  112.  y             Position        Position    320
  113. */
  114.  
  115. /* define any special resource names here that are not in <X11/StringDefs.h> */
  116.  
  117. #define XtNcursor "cursor"
  118. #define XtNframing "framing"
  119. #define XtNtransparent "transparent"
  120. #define XtNproportional "proportional"
  121. #define XtNgrid "grid"
  122. #define XtNgridTolerance "gridTolerance"
  123. #define XtNstippled "stippled"
  124. #define XtNaxes "axes"
  125. #define XtNdistance "distance"
  126. #define XtNsquareSize "squareSize"
  127. #define XtNpixmapWidth "pixmapWidth"
  128. #define XtNpixmapHeight "pixmapHeight"
  129. #define XtNbutton1Action "button1Action"
  130. #define XtNbutton2Action "button2Action"
  131. #define XtNbutton3Action "button3Action"
  132. #define XtNbutton4Action "button4Action"
  133. #define XtNbutton5Action "button5Action"
  134. #define XtNfilename "filename"
  135. #define XtNaddColorNtfyProc "addColorNtfyProc"
  136. #define XtNextensionNtfyProc "extensionNtfyProc"
  137. #define XtNstipple "stipple"
  138.  
  139. #define XtNscratch "scratch"
  140. #define XtNdummy "dummy"
  141.  
  142. #define XtCHighlight "Highlight"
  143. #define XtCFraming "Framing"
  144. #define XtCTransparent "Transparent"
  145. #define XtCProportional "Proportional"
  146. #define XtCGrid "Grid"
  147. #define XtCGridTolerance "GridTolerance"
  148. #define XtCStippled "Stippled"
  149. #define XtCAxes "Axes"
  150. #define XtCDistance "Distance"
  151. #define XtCSquareSize "SquareSize"
  152. #define XtCPixmapWidth "PixmapWidth"
  153. #define XtCPixmapHeight "PixmapHeight"
  154. #define XtCButton1Action "Button1Action"
  155. #define XtCButton2Action "Button2Action"
  156. #define XtCButton3Action "Button3Action"
  157. #define XtCButton4Action "Button4Action"
  158. #define XtCButton5Action "Button5Action"
  159. #define XtCFilename "Filename"
  160. #define XtCAddColorNtfyProc "AddColorNtfyProc"
  161. #define XtCExtensionNtfyProc "ExtensionNtfyProc"
  162. #define XtCStipple "Stipple"
  163.  
  164. #define XtDefaultTransparent "gray90"
  165.  
  166. /* pixmap defines */
  167.  
  168. #define NotSet    -1
  169. #define Clear     0
  170. #define Set       1
  171. #define Invert    2
  172. #define Highlight 3
  173. #define On        True
  174. #define Off       False
  175.  
  176. #define MarkRequest "MarkRequest"
  177. #define StoreRequest "StoreRequest"
  178. #define RestoreRequest "RestoreRequest"
  179. #define CopyRequest "CopyRequest"
  180. #define MoveRequest "MoveRequest"
  181. #define PointRequest "PointRequest"
  182. #define LineRequest "LineRequest"
  183. #define CurveRequest "CurveRequest"
  184. #define RectangleRequest "RectangleRequest"
  185. #define FilledRectangleRequest "FilledRectangleRequest"
  186. #define CircleRequest "CircleRequest"
  187. #define FilledCircleRequest "FilledCircleRequest"
  188. #define FloodFillRequest "FloodFillRequest"
  189. #define HotSpotRequest "HotSpotRequest"
  190. #define PickPixelRequest "PickPixelRequest"
  191. #define ZoomInRequest "ZoomInRequest"
  192. #define TextRequest "TextRequest"
  193. #define PasteRequest "PasteRequest"
  194. #define ImmediateCopyRequest "ImmediateCopyRequest"
  195. #define ImmediateMoveRequest "ImmediateMoveRequest"
  196.  
  197. #define NoColorName "None"
  198. #define UNDEF_PIXEL 0x80
  199. #define TRANSPARENT(dpy, scr_num) DisplayCells(dpy, scr_num)
  200.  
  201. typedef struct _PWRequestRec PWRequestRec;
  202. typedef char *PWRequest;
  203.  
  204. /* pixmap exports */
  205. typedef struct _PWColorInfo
  206. {
  207.   char *symbol;  /* symbol used to write pixmap to file */
  208.   char *s_name;  /* symbolic name of color */
  209.   char *m_name;  /* monochrome display color */
  210.   char *g4_name; /* g4 scale display color */
  211.   char *g_name;  /* g6 scale display color */
  212.   char *c_name;  /* color display name */
  213.   Pixel pixel;   /* pixel of color in colormap */
  214. } PWColorInfo;
  215.  
  216. typedef void (*AddColorNotifyProc)(
  217. #if NeedFunctionPrototypes
  218.   Widget /* w */,
  219.   Pixel /* pix */,
  220.   char* /* name */
  221. #endif 
  222. );
  223.  
  224. typedef void (*UseColorNotifyProc)(
  225. #if NeedFunctionPrototypes
  226.   Widget /* w */,
  227.   Pixel  /* current */
  228. #endif 
  229. );
  230.  
  231. typedef void (*ExtensionNotifyProc)(
  232. #if NeedFunctionPrototypes
  233.   Widget /* w */
  234. #endif
  235. );
  236. typedef void (*PickPixelProc)(
  237. #if NeedFunctionPrototypes
  238.   Widget     /* w */,
  239.   Position      /* x */,
  240.   Position      /* y */,
  241.   int         /* value */
  242. #endif 
  243. );
  244.  
  245. /* draw if object exists at x,y; otherwise ignore */
  246. typedef void (*PWDrawPointProc) (
  247. #if NeedFunctionPrototypes
  248.     Widget      /* w */,
  249.     Position    /* x */,
  250.     Position    /* y */,
  251.     int         /* value */
  252. #endif 
  253. );
  254.  
  255. /* draw all objects of extension */
  256. typedef void (*PWRedrawProc) (
  257. #if NeedFunctionPrototypes
  258.     Widget      /* w */,
  259.     int         /* value */
  260. #endif 
  261. );
  262.  
  263. /* erase, translate, draw all objects of extension */
  264. typedef void (*PWTranslateProc) (
  265. #if NeedFunctionPrototypes
  266.     Widget      /* w */,
  267.     Position    /* dx */,
  268.     Position    /* dy */
  269. #endif 
  270. );
  271.  
  272. /* erase, rotate, draw all objects of extension */
  273. enum RotateDirection { Right, Left };
  274. typedef void (*PWRotateProc) (
  275. #if NeedFunctionPrototypes
  276.     Widget               /* w */,
  277.     enum RotateDirection /* d */
  278. #endif 
  279. );
  280.  
  281. /* erase, flip, draw all objects of extension */
  282. enum FlipAxis { Horizontal, Vertical };
  283. typedef void (*PWFlipProc) (
  284. #if NeedFunctionPrototypes
  285.     Widget            /* w */,
  286.     enum FlipAxis     /* a */
  287. #endif 
  288. );
  289.  
  290.  
  291.  
  292.   
  293. _XFUNCPROTOBEGIN
  294.  
  295. extern char **PWGetExtensionNames( 
  296. #if NeedFunctionPrototypes
  297.     Widget    /* w */
  298. #endif
  299. );
  300.  
  301. extern XpmExtension *PWFindExtension(
  302. #if NeedFunctionPrototypes
  303.     Widget    /* w */,
  304.     String    /* name */
  305. #endif
  306. );
  307.  
  308. extern void PWAddExtension(
  309. #if NeedFunctionPrototypes
  310.     Widget    /* w */,
  311.     String    /* name */
  312. #endif
  313. );
  314.  
  315. extern void PWRemoveExtension(
  316. #if NeedFunctionPrototypes
  317.     Widget    /* w */,
  318.     String    /* name */
  319. #endif
  320. );
  321.  
  322. extern void PWUpdateExtension( 
  323. #if NeedFunctionPrototypes
  324.     Widget        /* w */,
  325.     XpmExtension*    /* new_extension */
  326. #endif
  327. );
  328.  
  329. extern void PWSetDrawPointProc( 
  330. #if NeedFunctionPrototypes
  331.      Widget             /* w */,
  332.      PWDrawPointProc    /* proc */
  333. #endif
  334. );
  335.  
  336. extern void PWSetRedrawProc(
  337. #if NeedFunctionPrototypes
  338.      Widget             /* w */,
  339.      PWRedrawProc       /* proc */
  340. #endif
  341. );
  342.  
  343. extern void PWSetTranslateProc(
  344. #if NeedFunctionPrototypes
  345.      Widget             /* w */,
  346.      PWTranslateProc    /* proc */
  347. #endif
  348. );
  349.  
  350. extern void PWSetRotateProc(
  351. #if NeedFunctionPrototypes
  352.      Widget             /* w */,
  353.      PWRotateProc       /* proc */
  354. #endif
  355. );
  356.  
  357. extern void PWSetFlipProc(
  358. #if NeedFunctionPrototypes
  359.      Widget             /* w */,
  360.      PWFlipProc     /* proc */
  361. #endif
  362. );
  363.  
  364. extern GC PWHighlightingGC(
  365. #if NeedFunctionPrototypes
  366.     Widget /* w */
  367. #endif
  368. );
  369.  
  370. extern GC PWFramingGC(
  371. #if NeedFunctionPrototypes
  372.     Widget /* w */
  373. #endif
  374. );
  375.  
  376. extern GC PWDrawingGC(
  377. #if NeedFunctionPrototypes
  378.     Widget /* w */
  379. #endif
  380. );
  381.  
  382. extern Position PWInWindowX(
  383. #if NeedFunctionPrototypes
  384.     Widget   /* w */,
  385.     float    /* x */
  386. #endif
  387. );
  388.  
  389. extern Position PWInWindowY(
  390. #if NeedFunctionPrototypes
  391.     Widget   /* w */,
  392.     float    /* y */
  393. #endif
  394. );
  395.  
  396.  
  397. extern Boolean PWEngageRequest(
  398. #if NeedFunctionPrototypes
  399.     Widget      /* w */,
  400.     PWRequest   /* name */,
  401.     Boolean     /* trap */,
  402.     XtPointer    /* call_data */,
  403.     Cardinal    /* call_data_size */
  404. #endif
  405. );
  406. extern Boolean PWTerminateRequest(
  407. #if NeedFunctionPrototypes
  408.     Widget      /* w */,
  409.     Boolean     /* cont */
  410. #endif
  411. );
  412. extern void PWRemoveAllRequests(
  413. #if NeedFunctionPrototypes
  414.     Widget      /* w */
  415. #endif
  416. );
  417.  
  418. extern Pixel PWGetTransparentPixel(
  419. #if NeedFunctionPrototypes
  420.     Widget       w 
  421. #endif
  422. );
  423.  
  424. extern Pixmap PWGetStipplePixmap(
  425. #if NeedFunctionPrototypes
  426.     Widget       w 
  427. #endif
  428. );
  429.  
  430. extern void PWClear(
  431. #if NeedFunctionPrototypes
  432.     Widget      /* w */
  433. #endif
  434. );
  435. extern void PWSet(
  436. #if NeedFunctionPrototypes
  437.     Widget      /* w */
  438. #endif
  439. );
  440. extern void PWUp(
  441. #if NeedFunctionPrototypes
  442.     Widget      /* w */
  443. #endif
  444. );
  445. extern void PWDown(
  446. #if NeedFunctionPrototypes
  447.     Widget      /* w */
  448. #endif
  449. );
  450. extern void PWLeft(
  451. #if NeedFunctionPrototypes
  452.     Widget      /* w */
  453. #endif
  454. );
  455. extern void PWRight(
  456. #if NeedFunctionPrototypes
  457.     Widget      /* w */
  458. #endif
  459. );
  460. extern void PWRotateRight(
  461. #if NeedFunctionPrototypes
  462.     Widget      /* w */
  463. #endif
  464. );
  465. extern void PWRotateLeft(
  466. #if NeedFunctionPrototypes
  467.     Widget      /* w */
  468. #endif
  469. );
  470. extern void PWSwitchGrid(
  471. #if NeedFunctionPrototypes
  472.     Widget      /* w */
  473. #endif
  474. );
  475. extern void PWGrid(
  476. #if NeedFunctionPrototypes
  477.     Widget      /* w */,
  478.     Boolean     /* _switch */
  479. #endif
  480. );
  481. extern void PWSwitchAxes(
  482. #if NeedFunctionPrototypes
  483.     Widget      /* w */
  484. #endif
  485. );
  486. extern void PWAxes(
  487. #if NeedFunctionPrototypes
  488.     Widget      /* w */,
  489.     Boolean     /* _switch */
  490. #endif
  491. );
  492. extern void PWDrawPoint(
  493. #if NeedFunctionPrototypes
  494.      Widget     /* w */,
  495.      Position   /* x */,
  496.      Position   /* y */,
  497.      int        /* value */
  498. #endif
  499. );
  500. extern void PWDrawLine(
  501. #if NeedFunctionPrototypes
  502.      Widget     /* w */,
  503.      Position   /* from_x */,
  504.      Position   /* from_y */,
  505.      Position   /* to_x */,
  506.      Position   /* to_y */,
  507.      int        /* value */
  508. #endif
  509. );
  510. extern void PWDrawRectangle(
  511. #if NeedFunctionPrototypes
  512.      Widget     /* w */,
  513.      Position   /* from_x */,
  514.      Position   /* from_y */,
  515.      Position   /* to_x */,
  516.      Position   /* to_y */,
  517.      int        /* value */
  518. #endif
  519. );
  520. extern void PWDrawFilledRectangle(
  521. #if NeedFunctionPrototypes
  522.      Widget     /* w */,
  523.      Position   /* from_x */,
  524.      Position   /* from_y */,
  525.      Position   /* to_x */,
  526.      Position   /* to_y */,
  527.      int        /* value */
  528. #endif
  529. );
  530. extern void PWDrawCircle(
  531. #if NeedFunctionPrototypes
  532.      Widget     /* w */,
  533.      Position   /* origin_x */,
  534.      Position   /* origin_y */,
  535.      Position   /* point_x */,
  536.      Position   /* point_y */,
  537.      int        /* value */
  538. #endif
  539. );
  540. extern void PWDrawFilledCircle(
  541. #if NeedFunctionPrototypes
  542.      Widget     /* w */,
  543.      Position   /* origin_x */,
  544.      Position   /* origin_y */,
  545.      Position   /* point_x */,
  546.      Position   /* point_y */,
  547.      int        /* value */
  548. #endif
  549. );
  550. extern void PWFloodFill(
  551. #if NeedFunctionPrototypes
  552.      Widget     /* w */,
  553.      Position   /* x */,
  554.      Position   /* y */,
  555.      int        /* value */
  556. #endif
  557. );
  558. extern void PWMark(
  559. #if NeedFunctionPrototypes
  560.      Widget     /* w */,
  561.      Position   /* from_x */,
  562.      Position   /* from_y */,
  563.      Position   /* to_x */,
  564.      Position   /* to_y */
  565. #endif
  566. );
  567. extern void PWSelect(
  568. #if NeedFunctionPrototypes
  569.      Widget     /* w */,
  570.      Position   /* from_x */,
  571.      Position   /* from_y */,
  572.      Position   /* to_x */,
  573.      Position   /* to_y */,
  574.      Time       /* time */
  575. #endif
  576. );
  577. extern void PWUnmark(
  578. #if NeedFunctionPrototypes
  579.      Widget     /* w */
  580. #endif
  581. );
  582. extern void PWStore(
  583. #if NeedFunctionPrototypes
  584.      Widget     /* w */
  585. #endif
  586. );
  587. extern void PWStoreToBuffer(
  588. #if NeedFunctionPrototypes
  589.      Widget     /* w */
  590. #endif
  591. );
  592. extern void PWUndo(
  593. #if NeedFunctionPrototypes
  594.      Widget     /* w */
  595. #endif
  596. );
  597. extern void PWResize(
  598. #if NeedFunctionPrototypes
  599.     Widget      /* w */,
  600.     Dimension   /* width */,
  601.     Dimension   /* height */
  602. #endif
  603. );
  604. extern void PWRescale(
  605. #if NeedFunctionPrototypes
  606.     Widget      /* w */,
  607.     Dimension   /* width */,
  608.     Dimension   /* height */
  609. #endif
  610. );
  611. extern void PWClip(
  612. #if NeedFunctionPrototypes
  613.      Widget     /* w */,
  614.      Position   /* from_x */,
  615.      Position   /* from_y */,
  616.      Position   /* to_x */,
  617.      Position   /* to_y */
  618. #endif
  619. );
  620. extern void PWUnclip(
  621. #if NeedFunctionPrototypes
  622.      Widget     /* w */
  623. #endif
  624. );
  625. extern void PWGrabSelection(
  626. #if NeedFunctionPrototypes
  627.     Widget      /* w */,
  628.     Time        /* time */
  629. #endif
  630. );
  631. extern void PWRequestSelection(
  632. #if NeedFunctionPrototypes
  633.     Widget      /* w */,
  634.     Time        /* time */,
  635.     Boolean     /* wait */
  636. #endif
  637. );
  638. extern void PWSetChanged(
  639. #if NeedFunctionPrototypes
  640.     Widget      /* w */
  641. #endif
  642. );
  643. extern Boolean PWQueryChanged(
  644. #if NeedFunctionPrototypes
  645.     Widget      /* w */
  646. #endif
  647. );
  648. extern int  PWReadFile(
  649. #if NeedFunctionPrototypes
  650.     Widget      /* w */,
  651.     String      /* filename */
  652. #endif
  653. );
  654. extern int  PWWriteFile(
  655. #if NeedFunctionPrototypes
  656.     Widget      /* w */,
  657.     String      /* filename */
  658. #endif
  659. );
  660. extern String PWUnparseStatus(
  661. #if NeedFunctionPrototypes
  662.     Widget      /* w */
  663. #endif
  664. );
  665. extern String PWGetFilename(
  666. #if NeedFunctionPrototypes
  667.     Widget      /* w */,
  668.     String*     /* str */
  669. #endif
  670. );
  671. extern void PWGetUnzoomedPixmap(
  672. #if NeedFunctionPrototypes
  673.     Widget      /* w */,
  674.     Pixmap*     /* pix */,
  675.     Pixmap*     /* pix_mask */
  676. #endif
  677. );
  678. extern void PWAddColorNotifyProc(
  679. #if NeedFunctionPrototypes
  680.      Widget             /* w */,
  681.      AddColorNotifyProc /* proc */
  682. #endif
  683. );
  684. extern void PWUseColorInTable(
  685. #if NeedFunctionPrototypes
  686.      Widget     /* w */,
  687.      Pixel      /* pixel */,
  688.      String     /* symbol */,
  689.      String     /* sname */,
  690.      String     /* mname */,
  691.      String     /* g4name */,
  692.      String     /* gname */, 
  693.      String     /* cname */
  694. #endif
  695. );
  696. extern void PWUpdateColorInTable(
  697. #if NeedFunctionPrototypes
  698.      Widget     /* w */,
  699.      Pixel      /* pixel */,
  700.      String     /* symbol */,
  701.      String     /* sname */,
  702.      String     /* mname */,
  703.      String     /* g4name */,
  704.      String     /* gname */, 
  705.      String     /* cname */
  706. #endif
  707. );
  708. extern PWColorInfo **PWGetColorTable(
  709. #if NeedFunctionPrototypes
  710.      Widget     /* w */
  711. #endif
  712. );
  713. extern void PWComments(
  714. #if NeedFunctionPrototypes
  715.      Widget     /* w */,
  716.      String*    /* hints_cmt */, 
  717.      String*    /* colors_cmt */, 
  718.      String*    /* pixels_cmt */
  719. #endif
  720. );
  721. extern void Notify(
  722. #if NeedFunctionPrototypes
  723.      Widget     /* w */,
  724.      void (*)() /* proc */
  725. #endif
  726. );
  727. extern void ColorNotify(
  728. #if NeedFunctionPrototypes
  729.      Widget     /* w */,
  730.      UseColorNotifyProc /* proc */
  731. #endif
  732. );
  733. extern void ExtensionNotify (
  734. #if NeedFunctionPrototypes
  735.      Widget                     /* w */,
  736.      ExtensionNotifyProc        /* proc */
  737. #endif
  738. );
  739. extern void PWBlindLine(
  740. #if NeedFunctionPrototypes
  741.      Widget     /* w */,
  742.      Position   /* from_x */, 
  743.      Position   /* from_y */,
  744.      Position   /* to_x */,
  745.      Position   /* to_y */, 
  746.      int        /* value */
  747. #endif
  748. );
  749. extern void PWChangeFilename(
  750. #if NeedFunctionPrototypes
  751.      Widget     /* w */,
  752.      String     /* str */
  753. #endif
  754. );
  755. extern void PWChangeNotify(
  756. #if NeedFunctionPrototypes
  757.      Widget     /* w */,
  758.      XtPointer   /* client_data */,
  759.      XtPointer   /* call_data */
  760. #endif
  761. );
  762. extern void PWClearChanged(
  763. #if NeedFunctionPrototypes
  764.     Widget     /* w */
  765. #endif
  766. );
  767. extern void PWClearHotSpot(
  768. #if NeedFunctionPrototypes
  769.      Widget     /* w */
  770. #endif
  771. );
  772. extern void PWClearMarked(
  773. #if NeedFunctionPrototypes
  774.      Widget     /* w */
  775. #endif
  776. );
  777. extern void PWCopy(
  778. #if NeedFunctionPrototypes
  779.      Widget     /* w */,
  780.      Position   /* at_x */,
  781.      Position   /* at_y */, 
  782.      int        /* value */
  783. #endif
  784. );
  785. extern void PWDebug(
  786. #if NeedFunctionPrototypes
  787.      Widget     /* w */
  788. #endif
  789. );
  790. extern void PWDragMarked(
  791. #if NeedFunctionPrototypes
  792.     Widget     /* w */,
  793.      Position   /* at_x */,
  794.      Position   /* at_y */
  795. #endif
  796. );
  797. extern void PWDragStored(
  798. #if NeedFunctionPrototypes
  799.      Widget     /* w */,
  800.      Position   /* at_x */,
  801.      Position   /* at_y */
  802. #endif
  803. );
  804. extern void PWDrawGrid(
  805. #if NeedFunctionPrototypes
  806.      Widget     /* w */,
  807.      Position   /* from_x */, 
  808.      Position   /* from_y */, 
  809.      Position   /* to_x */, 
  810.      Position   /* to_y */
  811. #endif
  812. );
  813. extern void PWDrawHotSpot(
  814. #if NeedFunctionPrototypes
  815.      Widget     /* w */, 
  816.      Position   /* x */,
  817.      Position   /* y */, 
  818.      int        /* value */
  819. #endif
  820. );
  821. extern Boolean PWAddRequest(
  822. #if NeedFunctionPrototypes
  823.      Widget     /* w */, 
  824.      PWRequest  /* name */, 
  825.      Boolean    /* trap */,
  826.      XtPointer   /* call_data */,
  827.      Cardinal   /*call_data_size */
  828. #endif
  829. );
  830. extern Boolean PWRemoveRequest(
  831. #if NeedFunctionPrototypes
  832.      Widget     /* w */
  833. #endif
  834. );
  835. extern Boolean PWQueryGrid(
  836. #if NeedFunctionPrototypes
  837.      Widget     /* w */
  838. #endif
  839. );
  840. extern Boolean PWQueryStippled(
  841. #if NeedFunctionPrototypes
  842.      Widget     /* w */
  843. #endif
  844. );
  845. extern Boolean PWQueryAxes(
  846. #if NeedFunctionPrototypes
  847.      Widget     /* w */
  848. #endif
  849. );
  850. extern Boolean PWQueryStored(
  851. #if NeedFunctionPrototypes
  852.      Widget     /* w */
  853. #endif
  854. );
  855. extern Boolean PWQueryMarked(
  856. #if NeedFunctionPrototypes
  857.      Widget     /* w */
  858. #endif
  859. );
  860. extern Boolean PWQueryZooming(
  861. #if NeedFunctionPrototypes
  862.      Widget     /* w */
  863. #endif
  864. );
  865. extern Boolean PWQueryProportional(
  866. #if NeedFunctionPrototypes
  867.      Widget     /* w */
  868. #endif
  869. );
  870. extern void PWFlipHoriz(
  871. #if NeedFunctionPrototypes
  872.      Widget     /* w */
  873. #endif
  874. );
  875. extern void PWFlipVert(
  876. #if NeedFunctionPrototypes
  877.      Widget     /* w */
  878. #endif
  879. );
  880. extern void PWFold(
  881. #if NeedFunctionPrototypes
  882.      Widget     /* w */
  883. #endif
  884. );
  885. extern void PWHighlightAxes(
  886. #if NeedFunctionPrototypes
  887.      Widget     /* w */
  888. #endif
  889. );
  890. extern void PWMove(
  891. #if NeedFunctionPrototypes
  892.      Widget     /* w */,
  893.      Position   /* at_x */,
  894.      Position   /* at_y */,
  895.      int        /* value */
  896. #endif
  897. );
  898. extern void PWPickPixelDraw(
  899. #if NeedFunctionPrototypes
  900.      Widget   /* w */,
  901.      Position /* x */, 
  902.      Position /* y */,
  903.      int      /* value */
  904. #endif
  905. );
  906. extern void PWPickPixelComplete(
  907. #if NeedFunctionPrototypes
  908.      Widget   /* w */,
  909.      Position /* x */, 
  910.      Position /* y */,
  911.      int      /* value */
  912. #endif
  913. );
  914. extern void PWProportional(
  915. #if NeedFunctionPrototypes
  916.      Widget     /* w */,
  917.      Boolean    /* _switch */
  918. #endif
  919. );
  920. extern XImage *PWGetImage(
  921. #if NeedFunctionPrototypes
  922.      Widget     /* w */
  923. #endif
  924. );
  925. extern void PWPutImage(
  926. #if NeedFunctionPrototypes
  927.      Widget     /* w */,
  928.      Display*  /* display */,
  929.      Drawable   /* drawable */, 
  930.      GC         /* gc */, 
  931.      Position   /* x */,
  932.      Position   /* y */
  933. #endif
  934. );
  935. extern void PWSetImage(
  936. #if NeedFunctionPrototypes
  937.      Widget     /* w */,
  938.      XImage*    /* image */,
  939.      XImage*    /* mask_image */
  940. #endif
  941. );
  942. extern void PWRedraw(
  943. #if NeedFunctionPrototypes
  944.      Widget     /* w */
  945. #endif
  946. );
  947. extern void PWRedrawAxes(
  948. #if NeedFunctionPrototypes
  949.      Widget     /* w */
  950. #endif
  951. );
  952. extern void PWRedrawGrid(
  953. #if NeedFunctionPrototypes
  954.      Widget     /* w */,
  955.      Position   /* from_x */,
  956.      Position   /* from_y */,
  957.      Position   /* to_x */,
  958.      Position   /* to_y */
  959. #endif
  960. );
  961. extern void PWRedrawHotSpot(
  962. #if NeedFunctionPrototypes
  963.      Widget     /* w */
  964. #endif
  965. );
  966. extern void PWRedrawMark(
  967. #if NeedFunctionPrototypes
  968.      Widget     /* w */
  969. #endif
  970. );
  971. extern void PWRedrawPoints(
  972. #if NeedFunctionPrototypes
  973.      Widget     /* w */,
  974.      Position   /* from_x */,
  975.      Position   /* from_y */,
  976.      Position   /* to_x */,
  977.      Position   /* to_y */
  978. #endif
  979. );
  980. extern void PWRedrawSquares(
  981. #if NeedFunctionPrototypes
  982.      Widget     /* w */,
  983.      Position   /* from_x */,
  984.      Position   /* from_y */,
  985.      Position   /* to_x */,
  986.      Position   /* to_y */
  987. #endif
  988. );
  989. extern void PWRestore(
  990. #if NeedFunctionPrototypes
  991.      Widget     /* w */,
  992.      Position   /* at_x */,
  993.      Position   /* at_y */,
  994.      int        /* value */
  995. #endif
  996. );
  997. extern void PWSetForeground(
  998. #if NeedFunctionPrototypes
  999.      Widget     /* w */,
  1000.      Pixel      /* color */
  1001. #endif
  1002. );
  1003. extern void PWSetHotSpot(
  1004. #if NeedFunctionPrototypes
  1005.      Widget     /* w */,
  1006.      Position   /* x */,
  1007.      Position   /* y */
  1008. #endif
  1009. );
  1010. extern void PWSwitchProportional(
  1011. #if NeedFunctionPrototypes
  1012.      Widget     /* w */
  1013. #endif
  1014. );
  1015. extern void PWTerminate(
  1016. #if NeedFunctionPrototypes
  1017.      Widget     /* w */
  1018. #endif
  1019. );
  1020. extern void PWZoomIn(
  1021. #if NeedFunctionPrototypes
  1022.      Widget     /* w */,
  1023.      Position   /* from_x */,
  1024.      Position   /* from_y */,
  1025.      Position   /* to_x */,
  1026.      Position   /* to_y */
  1027. #endif
  1028. );
  1029. extern void PWZoomMarked(
  1030. #if NeedFunctionPrototypes
  1031.      Widget     /* w */
  1032. #endif
  1033. );
  1034. extern void PWZoomOut(
  1035. #if NeedFunctionPrototypes
  1036.      Widget     /* w */
  1037. #endif
  1038. );
  1039. extern void PWRotateBufferAndImage(
  1040. #if NeedFunctionPrototypes
  1041.      Widget     /* w */
  1042. #endif
  1043. );
  1044. extern void PWSetPickPixelDrawProc(
  1045. #if NeedFunctionPrototypes
  1046.      Widget        /* w */,
  1047.      PickPixelProc /* proc */
  1048. #endif
  1049. );
  1050. extern void PWSetPickPixelCompleteProc(
  1051. #if NeedFunctionPrototypes
  1052.      Widget         /* w */,
  1053.      PickPixelProc /* proc */
  1054. #endif
  1055. );
  1056.  
  1057. extern void PWSetFont(
  1058. #if NeedFunctionPrototypes
  1059.      Widget        /* w */,
  1060.      XFontStruct*  /* font */
  1061. #endif
  1062. );
  1063.  
  1064. extern void PWSetText(
  1065. #if NeedFunctionPrototypes
  1066.      Widget     /* w */,
  1067.      String     /* s */
  1068. #endif
  1069. );
  1070.  
  1071. extern void PWDragText(
  1072. #if NeedFunctionPrototypes
  1073.      Widget     /* w */,
  1074.      Position   /* x */,
  1075.      Position   /* y */,
  1076.      int        /* value */
  1077. #endif
  1078. );
  1079.  
  1080. extern void PWDrawText(
  1081. #if NeedFunctionPrototypes
  1082.      Widget     /* w */,
  1083.      Position   /* x */,
  1084.      Position   /* y */,
  1085.      int        /* value */
  1086. #endif
  1087. );
  1088.  
  1089. _XFUNCPROTOEND
  1090.  
  1091. static char *rgb_fname = "/usr/lib/X11/rgb.txt";
  1092.  
  1093. /* declare specific PixmapWidget class and instance datatypes */
  1094.  
  1095. typedef struct _PixmapClassRec *PixmapWidgetClass;
  1096. typedef struct _PixmapRec      *PixmapWidget;
  1097. /* declare the class constant */
  1098.  
  1099. extern WidgetClass pixmapWidgetClass;
  1100.  
  1101. #endif /* _Pixmap_h */
  1102.  
  1103.  
  1104.